#include <iostream>
using namespace std;

/**
 * 运算符重载：：输入/输出运算符重载
*/

class Test{
    public:
        int num = 10;

        friend ostream &operator<<(ostream &output, const Test &t){
            output << "num:" << t.num;
            return output;
        };

        friend istream &operator>>( istream  &input, Test &t )
        { 
            input >> t.num;
            return input;            
        };
};

int main(){
    Test t1;
    
    // 控制台输入：55
    cin >> t1;

    // num:55
    cout << t1 << endl;
}